# -*-encoding: utf-8 -*-

import logging

# create logger
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)

# create file handler
fh = logging.FileHandler("log.log")
fh.setLevel(logging.INFO)

# create formatter
#fmt = "%(asctime)-15s [%(levelname)s] [%(filename)s] [LINE]%(lineno)d [%(process)d] {%(message)s}"
fmt = "%(asctime)-15s[%(levelname)s][%(filename)s][Line:%(lineno)d] - %(message)s"
datefmt = "[%a %d %b %Y][%H:%M:%S]"
formatter = logging.Formatter(fmt, datefmt)

# add handler and formatter to logger
fh.setFormatter(formatter)
logger.addHandler(fh)
